package com.cloudptt.api.models;

import com.cloudptt.api.product.log.Log;
import com.cloudptt.api.product.res.Resource;

public class CallDescInfo {

	public static final String title = "call_desc";
//	private int state = -1;
//	private Context context = null;
	
	public CallDescInfo()
	{
	}

	public String getErrDesc(int state)
	{
		String desc = "";
		try{
			String key = getKey(state);
			Log.e("CallDescInfo", "key=" + key );
			desc = Resource.getString(key);
		}
		catch(Exception e){
			e.printStackTrace();
			desc = Resource.getString("e_undefined");//context.getResources().getString(R.string.e_undefined);
			desc = String.format(desc, state);
		}
		
		return desc;
	}
	
	private String getKey(int state)
	{
		return title + "_" + state;
	}

	public String getTakenKey()
	{

		String desc = "";
		try{
			String key = title + "_taken";
			Log.e("CallDescInfo", "key=" + key );
			desc = Resource.getString(key);
		}
		catch(Exception e){
			e.printStackTrace();
			desc = Resource.getString("e_undefined");//context.getResources().getString(R.string.e_undefined);
			//desc = String.format(desc, state);
		}
		return desc;
	}
}
